<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/common/common.jsp" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <base href="<%=basePath%>" />
    <title>Energy Consumption Monitoring and Heating Cost Allocation System</title>
    <script type="text/javascript">
  		var path = "<%=basePath%>";
  	</script>
	<meta http-equiv="pragma" content="no-cache" />
	<meta http-equiv="cache-control" content="no-cache" />
	<meta http-equiv="expires" content="0" />    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3" />
	<meta http-equiv="description" content="This is my page" />
	<link rel="stylesheet" type="text/css" href="<%=basePath%>beshs/css/index.css" />
	<script type="text/javascript" src="<%=basePath%>resources/jquery/jquery-1.7.2.min.js"></script>
	<script type="text/javascript" src="<%=basePath%>beshs/js/menueffect.js"></script>
	<script type="text/javascript" src="<%=basePath%>resources/layer/layer.js"></script>
	<link rel="stylesheet" type="text/css" href="<%=basePath%>resources/layer/skin/default/layer.css" />
	<!--调节页面框架尺寸-->
	<script type="text/javascript"> 
		var div2Width;
		window.onload=AutoSize;
		window.onresize=AutoSize;
		function AutoSize() {
			var Height_Top = document.getElementById("head").offsetHeight;
			var Height_Body = document.getElementById("content").offsetHeight;
			var Height_RBody = document.getElementById("c_content").offsetHeight;
			var Height_LBody = document.getElementById("c_left").offsetHeight;
			var Height_Bottom = document.getElementById("foot").offsetHeight;
			var Height_Page = window.document.body.clientHeight;
			var Height_Page_Using = document.documentElement.clientHeight;
			//若以上无效，则采用(主要是IE6.0，5.0需要)
			if (Height_Page > Height_Page_Using) {
				Height_Page = Height_Page_Using;
			}  
			document.getElementById("content").style.height = (Height_Page - Height_Top - Height_Bottom) + "px";
			document.getElementById("c_content").style.height = (Height_Page - Height_Top - Height_Bottom) + "px";
			document.getElementById("c_content_content").style.height = (Height_Page - Height_Top - Height_Bottom-30) + "px";
			document.getElementById("c_left").style.height = (Height_Page - Height_Top - Height_Bottom) + "px";
			var Width_Left = document.getElementById("c_left").offsetWidth;
			var Width_Right = document.getElementById("c_content").offsetWidth;
			var Width_Page = window.document.body.clientWidth;
			var Width_Page_Using = document.documentElement.clientWidth;
			//若以上无效，则采用(主要是IE6.0，5.0需要)
			if (Width_Page > Width_Page_Using) {
				Width_Page = Width_Page_Using;
			}	  
			document.getElementById("c_content").style.width = (Width_Page - Width_Left) + "px";
			document.getElementById("c_sitemap").style.width = (Width_Page - Width_Left) + "px";
			document.getElementById("c_content_content").style.width = (Width_Page - Width_Left) + "px";
		}
	</script>
  </head>
  <body>
  	<!--头部开始-->
	<div id="head">
  		<div class="head_logo">
  			<!-- Logo图标 -->
  			<img src="<%=basePath%>beshs/images/login_index.png" width="60" height="56" class="img1"  alt=""/>
 	 		<!-- Logo系统名 -->
 	 		<img src="<%=basePath%>beshs/images/bg2.png" width="450" height="67" class="img2"  alt=""/>
    		<!-- 迅扬Logo -->
<!--  	 		<img src="<%=basePath%>beshs/images/login_logo2.png" width="270" height="40" class="img3"  alt=""/> -->
    		<div class="nav_rig right">
    			<script type="text/javascript">
    				function showPersonalInfo() {
    					window.frames["c_content_content"].location = path + "basic/userAction!showPersonalInfo.do?date="+new Date();
    				}
  				</script>
     			<ul>
			        <li><a href="javascript:showPersonalInfo()">[Personal Profile]</a></li>
			        <li style="background:url(<%=basePath%>beshs/images/icon2.gif) no-repeat left 4px;"><a href="<%=basePath%>basic/loginAction!logout.do">[Log Out]</a></li>
      			</ul>
    		</div>
  		</div>
  		<div class="hea_tow">
    		<div class="ht_welcome left"><s:property value="#session.user.userID" />，Hello！Welcome！</div>
  		</div>
	</div>
	<!--头部结束--> 
	<!--菜单开始-->
	<div id="content">
  		<div id="c_left">
    		<div class="menunav">
      			<div class="menu" id="menu">
					<script type="text/javascript">
						//菜单导航
						function menuNavigate(menuAction) {
							if(menuAction.indexOf("temperatureAction!queryTemperaturePage.do")>0){
								window.open(path+"temperature/temperatureAction!queryTemperaturePage.do","","top=0px,left=150,width="+1200+",height="+800+",toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=no");
								return;
							}
							
							//通过菜单切换页面
							if(menuAction!=null && $.trim(menuAction)!="") {
								window.frames["c_content_content"].location = path + menuAction;
							}
						}
					</script>
        			<s:iterator value="rootMenuList" var="menu">
        				<!-- 一级菜单 -->
      					<h1><a href="javascript:menuNavigate('<s:property value='#menu.menuAction' />')"><s:property value="#menu.menuName" /></a></h1>
      					<div>
      						<!-- 二级菜单 -->
      						<s:bean var="menuDecider" name="com.nari.basic.utils.struts2tags.MenuFilterDecider">
      							<s:param name="parentMenuID" value="#menu.id" />
      						</s:bean>
      						<s:subset source="authorityMenuList" decider="#menuDecider" var="subMenuList" >
      							<!-- 对子菜单进行排序 -->
      							<s:bean id="menuComparator" name="com.nari.basic.utils.struts2tags.MenuComparator" />
      							<s:sort var="comparedChildMenu" source="#attr.subMenuList" comparator="#menuComparator">
      								<ul>
	      								<s:iterator value="#attr.comparedChildMenu" var="childMenu">
	      									<li><a href="javascript:menuNavigate('<s:property value='#childMenu.menuAction' />')"><s:property value="#childMenu.menuName" /></a></li>
	      								</s:iterator>
      								</ul>
      							</s:sort>
      						</s:subset>
      					</div>
      				</s:iterator>
      			</div>
    		</div>
  		</div>
  		<!--菜单结束-->
  		<div id="c_content">
    		<div id="c_sitemap">Current Location：Home</div>
    		<iframe id="c_content_content" name="c_content_content" frameborder="0" scrolling="auto" src="<%=basePath%>basic/jsp/welcome.jsp"></iframe>
  		</div>
	</div>
	<div id="foot"><!-- 版权所有 © 2014 迅扬节能 保留所有权利 --></div>
  </body>
</html>
